Optimal. Leaf size=108 \[ \frac {2 a^2 (4 n+1) \tan (e+f x) \, _2F_1\left (\frac {1}{2},1-n;\frac {3}{2};\sec (e+f x)+1\right )}{f (2 n+1) \sqrt {a-a \sec (e+f x)}}+\frac {2 a^2 \tan (e+f x) (-\sec (e+f x))^n}{f (2 n+1) \sqrt {a-a \sec (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3814, 21, 3806, 65} \[ \frac {2 a^2 (4 n+1) \tan (e+f x) \, _2F_1\left (\frac {1}{2},1-n;\frac {3}{2};\sec (e+f x)+1\right )}{f (2 n+1) \sqrt {a-a \sec (e+f x)}}+\frac {2 a^2 \tan (e+f x) (-\sec (e+f x))^n}{f (2 n+1) \sqrt {a-a \sec (e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 65
Rule 3806
Rule 3814
Rubi steps
\begin {align*} \int (-\sec (e+f x))^n (a-a \sec (e+f x))^{3/2} \, dx &=\frac {2 a^2 (-\sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}}-\frac {(2 a) \int \frac {(-\sec (e+f x))^n \left (-a \left (\frac {1}{2}+2 n\right )+a \left (\frac {1}{2}+2 n\right ) \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)}} \, dx}{1+2 n}\\ &=\frac {2 a^2 (-\sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}}+\frac {(a (1+4 n)) \int (-\sec (e+f x))^n \sqrt {a-a \sec (e+f x)} \, dx}{1+2 n}\\ &=\frac {2 a^2 (-\sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}}+\frac {\left (a^3 (1+4 n) \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {(-x)^{-1+n}}{\sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{f (1+2 n) \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {2 a^2 (1+4 n) \, _2F_1\left (\frac {1}{2},1-n;\frac {3}{2};1+\sec (e+f x)\right ) \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}}+\frac {2 a^2 (-\sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 13.72, size = 346, normalized size = 3.20 \[ -\frac {2^{n-\frac {3}{2}} e^{-\frac {1}{2} i (2 n+1) (e+f x)} \left (\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}\right )^{n+\frac {1}{2}} \csc ^3\left (\frac {1}{2} (e+f x)\right ) (a-a \sec (e+f x))^{3/2} \left (3 n \left (n^2+4 n+3\right ) e^{i (n+2) (e+f x)} \, _2F_1\left (1,\frac {1-n}{2};\frac {n+4}{2};-e^{2 i (e+f x)}\right )+\left (n^3+6 n^2+11 n+6\right ) e^{i n (e+f x)} \, _2F_1\left (1,\frac {1}{2} (-n-1);\frac {n+2}{2};-e^{2 i (e+f x)}\right )-n (n+2) \left ((n+1) e^{i (n+3) (e+f x)} \, _2F_1\left (1,1-\frac {n}{2};\frac {n+5}{2};-e^{2 i (e+f x)}\right )+3 (n+3) e^{i (n+1) (e+f x)} \, _2F_1\left (1,-\frac {n}{2};\frac {n+3}{2};-e^{2 i (e+f x)}\right )\right )\right ) (-\sec (e+f x))^n \sec ^{-n-\frac {3}{2}}(e+f x)}{f n (n+1) (n+2) (n+3)} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.55, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-{\left (a \sec \left (f x + e\right ) - a\right )} \sqrt {-a \sec \left (f x + e\right ) + a} \left (-\sec \left (f x + e\right )\right )^{n}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (-a \sec \left (f x + e\right ) + a\right )}^{\frac {3}{2}} \left (-\sec \left (f x + e\right )\right )^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.10, size = 0, normalized size = 0.00 \[ \int \left (-\sec \left (f x +e \right )\right )^{n} \left (a -a \sec \left (f x +e \right )\right )^{\frac {3}{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (-a \sec \left (f x + e\right ) + a\right )}^{\frac {3}{2}} \left (-\sec \left (f x + e\right )\right )^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (a-\frac {a}{\cos \left (e+f\,x\right )}\right )}^{3/2}\,{\left (-\frac {1}{\cos \left (e+f\,x\right )}\right )}^n \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (- \sec {\left (e + f x \right )}\right )^{n} \left (- a \left (\sec {\left (e + f x \right )} - 1\right )\right )^{\frac {3}{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________